class Page7 extends BaseScreen {
    public constructor() {
        super();
        this.skinName = "resource/eui_skins/Page7Skin.exml";
    }

	private img_1: eui.Image;
    private img_2: eui.Image;
    private img_3: eui.Image;
    private img_4: eui.Image;
    private img_5: eui.Image;
    private img_6: eui.Image;
    private img_7: eui.Image;
    private img_8: eui.Image;
    private img_9: eui.Image;
    private img_10: eui.Image;
    private img_11: eui.Image;
    private img_7_x: number = 0;
    private img_8_x: number = 0;
    private img_9_x: number = 0;
    private img_10_y: number = 0;
    private img_11_y: number = 0;

    protected childrenCreated(): void {
        super.childrenCreated();
        this.init_view();
    }

    public init_view() {
        
        // this.img_10_y = this.img_10.y;
        // this.img_11_y = this.img_11.y;
        this.anchorOff(this.img_3);
        this.resetui();
        this.page_mode = '东方新语，青年演讲协会';
    }

    public resetui(){
        this.img_1.alpha = 0;
        this.img_2.alpha = 0;
        this.img_3.scaleX = this.img_3.scaleY = 0;
        // this.img_4.x = -640;

        // this.img_10.y = this.height + this.img_10.height;
        // // this.img_11.y = this.height + this.img_11.height;
        // this.img_11.scaleY = 0;
        
        if(this.xx_page){
            this.xx_page.stop();
        }
    }

    public showPage() {
        super.showPage();
        
        this.resetui();
        egret.Tween.get(this.img_1).to({ alpha:1}, 2000);
        egret.Tween.get(this.img_2).wait(200).to({ alpha:1}, 1000);
        egret.Tween.get(this.img_3).wait(200).to({ scaleX:1,scaleY:1}, 1000,egret.Ease.backOut);

        // egret.Tween.get(this.img_10).wait(1200).to({ y:this.img_10_y}, 600);
        // egret.Tween.get(this.img_11).wait(2000).to({ y:this.img_11_y}, 600,egret.Ease.backOut);
        // egret.Tween.get(this.img_11).wait(1700).to({ scaleY:1}, 600,egret.Ease.backOut);
        
        if(this.xx_page){
            this.xx_page.start();
        }
    }

    public resize(): void {
         super.resize();
    }
}